package com.wangzhixuan.model.vo;

import java.io.Serializable;

import com.wangzhixuan.commons.constant.ApiCode;
import com.wangzhixuan.commons.scan.MyException;
import com.wangzhixuan.commons.utils.StringUtils;

/**
 * <p>
 * 
 * </p>
 *
 * @author zhixuan.wang
 * @since 2017-07-11
 */
public class CustomerVo implements Serializable {

    private static final long serialVersionUID = 1L;
    
    private Integer cusId;
	private String cusName;
	private String cusPhoneNum;
	private String companyName;
	private String companyAddress;
	private String cusMail;
	private String cusWeChat;
	private String cusInitials;
	private Integer userId;
	
	public Integer getUserId() {
		return userId;
	}


	public String getCusInitials() {
		return cusInitials;
	}


	public void setCusInitials(String cusInitials) {
		this.cusInitials = cusInitials;
	}


	public void setUserId(Integer userId) {
		this.userId = userId;
	}


	public Integer getCusId() {
		return cusId;
	}


	public void setCusId(Integer cusId) {
		this.cusId = cusId;
	}


	public String getCusName() {
		return cusName;
	}


	public void setCusName(String cusName) {
		this.cusName = cusName;
	}


	public String getCusPhoneNum() {
		return cusPhoneNum;
	}


	public void setCusPhoneNum(String cusPhoneNum) {
		this.cusPhoneNum = cusPhoneNum;
	}


	public String getCompanyName() {
		return companyName;
	}


	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}


	public String getCompanyAddress() {
		return companyAddress;
	}


	public void setCompanyAddress(String companyAddress) {
		this.companyAddress = companyAddress;
	}


	public String getCusMail() {
		return cusMail;
	}


	public void setCusMail(String cusMail) {
		this.cusMail = cusMail;
	}


	public String getCusWeChat() {
		return cusWeChat;
	}


	public void setCusWeChat(String cusWeChat) {
		this.cusWeChat = cusWeChat;
	}


	public void checekParam() throws MyException{
		if(this.userId==null){
			 throw new MyException(ApiCode.CODE_501, "请重新登录");
		}
		if (StringUtils.isBlank(cusName)) {
			throw new MyException(ApiCode.CODE_501, "网络异常，请稍后重试");
        }
		if (StringUtils.isBlank(cusPhoneNum)) {
			throw new MyException(ApiCode.CODE_501, "网络异常，请稍后重试");
        }
		if (StringUtils.isBlank(companyName)) {
			throw new MyException(ApiCode.CODE_501, "网络异常，请稍后重试");
        }
		if (StringUtils.isBlank(companyAddress)) {
			throw new MyException(ApiCode.CODE_501, "网络异常，请稍后重试");
        }
	}
	
}
